<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/operationsinfo/operations/q_operations.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/operationsinfo/operations/q_operations.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Operations',
                footer: "Foots",
                cnName: '运维服务单',
                name: 'operations/q_operations',
                url: "/q_operations/",
                sortName: "Voucher_sub"
            });
            const editFormFields = ref({"Voucher_sub":"","Site":"","Operations_date":""});
            const editFormOptions = ref([[{"title":"单据编码","field":"Voucher_sub","disabled":true,"type":"text"},
                               {"dataKey":"运维站点","data":[],"title":"站点名称","required":true,"field":"Site","disabled":true,"type":"select"},
                               {"title":"运维日期","required":true,"field":"Operations_date","type":"date"}]]);
            const searchFormFields = ref({"Voucher_sub":"","Site":"","AuditStatus":"","Operations_date":""});
            const searchFormOptions = ref([[{"title":"单据编码","field":"Voucher_sub","type":"like"},{"dataKey":"运维站点","data":[],"title":"站点名称","field":"Site","type":"select"},{"dataKey":"audit","data":[],"title":"审核状态","field":"AuditStatus","type":"select"},{"title":"运维日期","field":"Operations_date","type":"date"}]]);
            const columns = ref([{field:'Voucher_sub',title:'单据编码',type:'string',link:true,width:120,readonly:true,align:'left',sort:true},
                       {field:'Site',title:'站点名称',type:'string',bind:{ key:'运维站点',data:[]},width:220,readonly:true,require:true,align:'left'},
                       {field:'AuditStatus',title:'审核状态',type:'int',bind:{ key:'audit',data:[]},width:110,align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:220,align:'left'},
                       {field:'AuditDate',title:'审核时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'AuditID',title:'审核人员id',type:'int',width:110,hidden:true,align:'left'},
                       {field:'Auditor',title:'审核人员',type:'string',width:120,hidden:true,align:'left'},
                       {field:'CreateID',title:'创建人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人员',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人员',type:'string',width:100,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'Operations',title:'ID',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'Operations_date',title:'运维日期',type:'datetime',width:150,require:true,align:'left',sort:true},
                       {field:'Longitude',title:'经度',type:'decimal',width:110,align:'left'},
                       {field:'Latitude',title:'纬度',type:'decimal',width:110,align:'left'}]);
            const detail = ref({
                cnName: "运维服务单明细",
                table: "q_operationsList",
                columns: [{field:'OperationsList',title:'ID',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Operations',title:'父ID',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'Code',title:'运维内容编码',type:'int',width:120,require:true,align:'left',sort:true},
                       {field:'Name',title:'运维名称',type:'string',width:110,require:true,align:'left'},
                       {field:'Operations_date',title:'应运维日期',type:'datetime',width:150,require:true,align:'left',sort:true},
                       {field:'Case',title:'维护情况',type:'string',width:220,edit:{type:''},align:'left'},
                       {field:'Image',title:'图片',type:'img',width:220,edit:{type:'img'},align:'left'},
                    //    {field:'Attachment',title:'附件',type:'file',width:110,edit:{type:'file'},align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:220,edit:{type:''},align:'left'}],
                sortName: "Code",
                key: "OperationsList"
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
